<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page isELIgnored="false" %> 
<%@ page import="dao.CompanyDao" %> 
<%@ page import="dao.ChartsDao" %>
<%@ page import="bean.Company" %> 
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link href="<%=request.getContextPath() %>/css/SonPage.css" rel="stylesheet" type="text/css">
    <link href="<%=request.getContextPath() %>/css/Element.css" rel="stylesheet" type="text/css">
    <link href="<%=request.getContextPath() %>/css/easyui.css" rel="stylesheet" type="text/css">
    <link href="<%=request.getContextPath() %>/css/icon.css" rel="stylesheet" type="text/css">
    <script src="<%=request.getContextPath() %>/js/Mtopt_1.1.js" type="text/javascript"></script>
    <script src="<%=request.getContextPath() %>/js/SonPage.js" type="text/javascript"></script>
    <script src="<%=request.getContextPath() %>/js/jquery-1.8.3.js" type="text/javascript"></script>
    <script src="<%=request.getContextPath() %>/js/jquery.easyui.min.js" type="text/javascript"></script>
    <script src="<%=request.getContextPath() %>/js/easyui-lang-zh_CN.js" type="text/javascript"></script>
    <style type="text/css">
    .DivShowData{ 
        position:static; 
        width:1180px;
        height:600px;
     }
     .table {
        width: 990px;
        border: 1px solid #95B8E7;
      }
    </style>    
</head>
<body>
    <base href="<%=basePath%>">
	<%  
	    String company_id=request.getParameter("company_id");
	    CompanyDao cdao=new CompanyDao();
	    ChartsDao dao=new ChartsDao();
	    List<Company> list=cdao.findById(company_id);
	    String companyName=list.get(0).getCompanyName();
	    List<Map> list2=dao.findOutlet(company_id);
	    int length=list2.size();
	    %>
    <div class="DivShowData panel-noscroll">
        <form action="<%=request.getContextPath()%>/SearchVentServlet" method="post">
        <div class="panel datagrid" style="width: 1180px;">
	        <div class="panel-header" style="width: 1168px;">	        
	            <div class="panel-title">企业排放口编辑</div>
	            <div class="panel-tool"></div>
	        </div>
            <div class="datagrid-wrap panel-body" title="" style="width: 1178px; height: 571px;">
            <div class="datagrid-toolbar">
            <table cellspacing="0" cellpadding="0">
            	<tbody>
                    <tr>
                      <td>
	                       <a href="<%=request.getContextPath()%>/vent/addvent.jsp?company_id=<%=company_id %>" class="l-btn l-btn-plain" id="">
						        <span class="l-btn-left">
						            <span class="l-btn-text icon-add l-btn-icon-left">增加</span>
	                            </span>
	                       </a>
	                       <a href="<%=request.getContextPath()%>/user/EnterpriseManage.jsp " class="l-btn l-btn-plain" id="">
						        <span class="l-btn-left">
						            <span class="l-btn-text icon-return l-btn-icon-left">返回</span>
	                            </span>
	                       </a>
                      </td>          
		           </tr>
		        </tbody>
		    </table> 
            </div>
        <div class="datagrid-view" style="width: 1178px; height: 542px;">
        <style type="text/css">
			div.datagrid-cell-c1-PolluteSourceNo {width:undefinedpx;}
			div.datagrid-cell-c1-PolluteSourceName {width:92px;}
			div.datagrid-cell-c1-GroupName {width:72px;}
			div.datagrid-cell-c1-TypeName {width:32px;}
			div.datagrid-cell-c1-IndustryName {width:92px;}
			div.datagrid-cell-c1-OperateScaleName {width:52px;}
			div.datagrid-cell-c1-AttentionName {width:32px;}
			div.datagrid-cell-c1-TakeoverName {width:32px;}
			div.datagrid-cell-c1-PleaceName {width:52px;}
			div.datagrid-cell-c1-9 {width:12px;}
        </style>
<div class="datagrid-view1" style="width: 0px;">
	<div class="datagrid-header" style="width: 0px;"></div>
	<div class="datagrid-body" style="width: 0px; margin-top: 0px; height: 492px;"></div>
	<div class="datagrid-footer" style="width: 0px;">
		<div class="datagrid-footer-inner" style="display: none;"></div>
	</div>
</div>
<div class="datagrid-view2" style="width: 1178px;">
		<div class="datagrid-header" >
			<div class="datagrid-header-inner" style="display: block;">
				<table class="datagrid-htable" >
						<tr class="datagrid-header-row">
						    
							<td  field="PolluteSourceName">
								<div class="datagrid-cell" style="width: 205px; text-align: left;">
									<span>企业名</span>
									<span class="datagrid-sort-icon">&nbsp;</span>
								</div>
							</td>
							<td style="width:200px;">
                                <div class="datagrid-cell-group">排放口</div>
                            </td>
					    </tr>
		               <tr>		                  
		               	  <td rowspan="<%=length+1 %>"><%=companyName %></td>	
		               </tr>	               		                  	                  
					      <%for(Map map:list2) { %>
					    <tr>
		                  <td><%=map.get("outlet_name") %></td>
						  <td style="width:50px;">						     
		<a href="<%=request.getContextPath()%>/deleteVentServlet?outlet_id=<%=map.get("outlet_id")%>&company_id=<%=company_id%>">删除</a>
						  </td>							   					  
					   </tr>
					  	<%} %>				  
			</table>
		  </div>
	    </div>     
     </div>
       </div>
           </div>
    </div>
    </form>
  </div>
    </body>
    </html>